package com.zhejiangzhengyuan.municipal_common.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhejiangzhengyuan.municipal_common.entity.dto.OneWaySendCase;
import com.zhejiangzhengyuan.municipal_common.entity.vo.*;
import com.zhejiangzhengyuan.municipal_common.entity.dto.NewCase;
import com.zhejiangzhengyuan.municipal_common.response.ResponseVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author :linju
 * @since  on : 2019/11/26
 */
public interface CaseManagementService {

  public void formatOneWayCaseNoHandVo(List<OneWayCaseNoHandVo> records);

  Page<CaseNoHandle> selectAll(
      Page<CaseNoHandle> page,
      String warnType,
      String dataOrigin,
      String deviceCode,
      String reason,
      String username,
      String startTimestamp,
      String endTimestamp);
  ResponseVo insertCaseAndWarn(NewCase newCase, String moduleName, String caseType, String warnType)
      throws IOException;

  Page<CaseNoHandle> selectCaseHandlingPage(
      Page<CaseNoHandle> page,
      String caseType,
      String warnType,
      String dataOrigin,
      String deviceCode,
      String reason,
      String username,
      String startTimestamp,
      String endTimestamp);

  Page<CaseIsHandledVo> selectCaseIsHandledPage(
      Page<CaseIsHandledVo> page,
      String caseType,
      String warnType,
      String dataOrigin,
      String deviceCode,
      String reason,
      String username,
      String startTimestamp,
      String endTimestamp);

  CaseIsHandledVo selectCaseIsHandledPageName(Long cId, String caseType);

  CaseDetails selectCaseDetailsById(Long wid, Long cid, Long did);

  int deleteCaseIsHanled(Long id);

  int deleteCaseIsHanledByIds(List idList);

  CaseTrackVo selectCaseTrack(Long id);

  // 一路一档案件管理 查询案件在未派单时的分页查询
  Page<OneWayCaseNoHandVo> selectInspectionPage(Page<OneWayCaseNoHandVo> page, String caseType,
                                                String dataOrigin,
                                                String reason,
                                                String name,
                                                String startTimestamp,
                                                String endTimestamp);

  // oneWaySendCase
  ResponseVo OneWaySendCase(OneWaySendCase oneWaySendCase) throws IOException;

  // 井盖导出未处理警报事件
  void exportNoHandleToExcel(HttpServletResponse response, String warnType);

  // 井盖导出正处理处理警报事件
  void exportHandlingToExcel(HttpServletResponse response, String caseType, String warnType);

  // 井盖导出已处理警报事件
  void exportIsHandledToExcel(HttpServletResponse response, String caseType, String warnType);

  // 一路一档案件管理新建案件
  long insertCaseAndInspection(NewCase newCase) throws IOException;

  // 一路一档案件管理,导出案件在未派单时的数据
  void exportOneWayNoHandle(HttpServletResponse response, String caseType);

  // 一路一档案件管理 查询案件在处理中时的分页查询
  Page<OneWayCaseNoHandVo> selectInspectionCaseHandingPage(
      Page<OneWayCaseNoHandVo> page, String caseType,
      String dataOrigin,
      String reason,
      String name,
      String startTimestamp,
      String endTimestamp);

  ResponseVo OneWayRepeatSendCase(OneWaySendCase oneWaySendCase) throws IOException;

  CaseTrackVo selectOneWayCaseTrack(Long id);

  // 一路一档案件管理,导出案件在处理中时的数据
  void exportOneWayHandling(HttpServletResponse response, String caseType);

  // 一路一档案件管理 查询案件在已处理时的分页查询
  Page<OneWayCaseNoHandVo> selectInspectionCaseIsHandledPage(
      Page<OneWayCaseNoHandVo> page, String caseType,String dataOrigin,
      String reason,
      String name,
      String startTimestamp,
      String endTimestamp);

  // 一路一档案件管理,导出案件在已处理时的数据
  void exportOneWayIsHandled(HttpServletResponse response, String caseType);

  OneWayCaseDetailsVo selectOneWayCaseDetails(Long iid, Long cid);

  // 泵站，查询案件在未派单时的分页查询
  Page<CaseNoHandle> selectPumpCaseNoHandlePage(Page<CaseNoHandle> page, String dataOrigin , String reason, String username, String startTimestamp, String endTimestamp, String warnType);

  // 泵站，查询案件在处理中的分页查询
  Page<CaseNoHandle> selectPumpCaseHandlingPage(
          Page<CaseNoHandle> page, String dataOrigin , String reason, String username, String startTimestamp, String endTimestamp, String caseType,String warnType);

  // 泵站，查询案件在已处理的分页查询
  Page<CaseIsHandledVo> selectPumpCaseIsHandledPage(
          Page<CaseIsHandledVo> page, String dataOrigin , String reason, String username, String startTimestamp, String endTimestamp, String caseType,String warnType);

  // 泵站，查询数据管理有害气体检测的分页查询
  Page<NoxiousGasVo> selectPumpNoxiousGasData(Page<NoxiousGasVo> page);

  // 泵站，导出数据管理有害气体检测的数据
  List<NoxiousGasVo> exportPumpNoxiousGasData();

  // 泵站，查询数据管理泵站运行时数据的分页查询
  Page<PumpOperatingDataVo> PumpOperatingDataVo(Page<PumpOperatingDataVo> page);

  // 泵站，导出数据管理泵站运行时的数据
  List<PumpOperatingDataVo> exportPumpOperatingData();

  // 泵站，查询数据管理液位监测时的数据
  Page<PumpOperatingDataVo> selectPumpPolingCheckPage(Page<PumpOperatingDataVo> page);

  // 泵站，导出数据管理液位监测时的数据
  List<PumpOperatingDataVo> exportPumpPolingCheckPage();

  List<CaseNoHandle> mobileNewTest(String caseType, String warnType);

  List<OneWayCaseNoHandVo> selectInspectionNewTest(String caseType);

  Page<OneWayCaseNoHandVo> selectInspectionCaseOnlyHandingPage(
      Page<OneWayCaseNoHandVo> page, String caseType);

  ResponseVo getInsertFileResult(long iid, MultipartFile file, String moduleName) throws IOException;
}
